package com.evan.common.service.impl;

import com.evan.common.dao.UserDao;
import com.evan.common.pojo.User;
import com.evan.common.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description:
 * @author: xiaohu
 * @createDate: 2021/7/14 23:33
 */
@Service("service")
public class UserServiceImpl implements UserService {

    @Autowired
    UserDao ud;

    @Override
    public List<User> getAllUser() {
        return ud.findAll();
    }

    @Override
    public void addUser(User user) {
        ud.save(user);
    }
}
